package net.sf.midollo.task;

public class TaskPoolEntry implements Runnable {

	private final TaskPool taskPool;

	public TaskPoolEntry(TaskPool taskPool) {
		this.taskPool = taskPool;
	}

	public void run() {
		do {
			try {
				Runnable task = this.taskPool.nextTask();
				task.run();
			} catch (InterruptedException e) {
				break;
			}
		} while (true);
	}
}
